
#include "RealTimeDealIndexList.h"

#include "RealTimeDealSorter.h"

namespace detail {
DealIndexComparator::DealIndexComparator(const DealIndexComparator& cmp)
    : m_sorter(cmp.m_sorter) {}

DealIndexComparator::DealIndexComparator(RealTimeDealSorter* sorter)
    : m_sorter(sorter) {}

detail::DealIndexComparator& DealIndexComparator::operator=(
    const DealIndexComparator& cmp) {
  m_sorter = cmp.m_sorter;
  return *this;
}

int DealIndexComparator::operator()(const DealIndex& b1,
                                    const DealIndex& b2) const {
  return m_sorter->CompareIndex(b1, b2);
}

}  // namespace detail